package com.tbocek.android.ode.solver;

/**
 * Interface representing a system of equations expressed as:
 * y_1' = f_1(t, x_1, ..., x_n)
 * ...
 * y_n' = f_n(t, x_1, ..., x_n)
 * @author Tim
 *
 */
public abstract class ODESystem {
	/**
	 * Computes the derivatives of the variables in the system.
	 * @param state The state of the system to compute derivatives for.
	 * @return The derivatives of each variable.
	 */
	public abstract float[] computeDerivatives(SystemState state);
	
	/**
	 * Factory method to create a new state specific to this system.
	 * @return The new system state.
	 */
	public SystemState createSystem() {
		return new SystemState();
	}
}
